#-- gtest
GTEST_HOME_PATH		:= $(HOME)/dev/jcx/third/googletest
GTEST_INC_PATH		:= $(GTEST_HOME_PATH)/googletest/include
GTEST_LIB_PATH		:= $(GTEST_HOME_PATH)/build/lib
GTEST_LIB_NAME		:= gtest
GTEST_LIB_FULL_NAME	:= $(GTEST_LIB_PATH)/$(GTEST_LIB_NAME).a

CXXFLAGS 	:= $(addprefix -I, $(GTEST_INC_PATH))
CXXFLAGS 	+= -std=c++11 -g -Wall -Werror
LOADLIBES   := $(addprefix -L, $(GTEST_LIB_PATH))

LDLIBS      := $(addprefix -l, $(GTEST_LIB_NAME))
LDLIBS      += -lgtest_main -lpthread


OBJS = $(patsubst %.cpp,%.o, $(wildcard *.cpp))


all: bpmain 

bpmain:$(OBJS)
	$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@

clean:
	rm -frv bpmain $(OBJS)


.o: %.cpp
	$(COMPILE.cpp) $(OUTPUT_OPTION) $<

